		function checkImgs() {//获取图片元素进行遍历
				  const imgs = document.querySelectorAll(".my-photo");//获取图片
				  Array.from(imgs).forEach(el => {
				    if (isInSight(el)) {
				      loadImg(el);
				    }
				  })
				}

		function loadImg(el) {//给图片src赋值
		  if (!el.src) {
		    const source = el.dataset.src;
		    //console.log(el.dataset.src)
		    el.src = source;
		  }
		}

		function isInSight(el){//判断图片进入可视区域
		  const bound = el.getBoundingClientRect();
		  const clientHeight = window.innerHeight;
		  //如果只考虑向下滚动加载
		  //const clientWidth = window.innerWeight;
		  return bound.top >=0 && (bound.bottom<=(window.innerWeight || document.documentElement.clientHeight));
		}


		function throttle(fn, mustRun = 500){//函数节流，时间间隔超过500ms时 阻止触发
		  const timer = null;
		  let previous = null;
		  return function() {
		    const now = new Date();
		    const context = this;
		    const args = arguments;
		    if (!previous) {
		      previous = now;
		    }
		    const remaining = now - previous;
		    if (mustRun && remaining >= mustRun) {
		      fn.apply(context, args);
		      previous = now;
		    }
		  }
		}
